libxl: initialise nr_dom_vcpus to fix 4a6070ea9
authorWei Liu <wei.liu2@citrix.com>
Mon, 24 Oct 2016 10:11:15 +0000 (11:11 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 24 Oct 2016 10:53:20 +0000 (11:53 +0100)
commita134aeaa17ad3618575fac86f27246a3b2466001
treebb9ca6dbe345a8683cc8e68cb306be0b50279d0f
parent2f5a483928116781025d2334684e8a0c2eb8792e
libxl: initialise nr_dom_vcpus to fix 4a6070ea9

Clang complains nr_dom_vcpus may be used uninitialised after
4a6070ea9.

The real issue is vinfo can be NULL and nr_dom_vcpus remains
uninitialised if previous call fails.

Initialise nr_dom_vcpus to 0 at the beginning of the loop to fix the
issue.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_numa.c